#pragma once

#include <Windows.h>

#include "BaseInc.h"

class CPaintHDC : public IPaint2D
{
public :
	CPaintHDC(HDC hdc);
	~CPaintHDC();

	void SetPixel(int_32 iX, int_32 iY, uint_32 uiColor);
	uint_32 GetPixel(int_32 iX, int_32 iY);
	void DrawLine(int_32 iX1, int_32 iY1, int_32 iX2, int_32 iY2, float_32 fLineWidth, uint_32 uiLineColor);
	void DrawRect(int_32 iX1, int_32 iY1, int_32 iWidth, int_32 iHeight, 
		float_32 fLineWidth, uint_32 uiLineColor);
	void FillRect(int_32 iX1, int_32 iY1, int_32 iWidth, int_32 iHeight, uint_32 uiBrushColor);
	void DrawText(const char_16 * szText, int_32 iX, int_32 iY, uint_32 uiTextColor);

	float_32 GetLineWidth() const;
	uint_32 GetLineColor() const;

	void SetNullPen();
	void SetSolidPen(float_32 fWidth, uint_32 uiColor);
	void SetPen(HPEN hPen);
	void SetNullBrush();
	void SetSolidBrush(uint_32 uiColor);
	void SetBrush(HBRUSH hBrush);
	void SetFont(const char_16 * szFace, uint_32 uiSize);
private:
	HDC m_hdc;
	HPEN m_hPen;
	HBRUSH m_hBrush;
	HFONT m_hFont;
};
